package com.zzh.lib.plugin.msg;

import com.zzh.lib.plugin.install.Installer;
import com.zzh.lib.plugin.util.PluginReflectUtil;
/**
 *
 * @Date: 2021/5/27 09:28
 * @Email: zzh_hz@126.com
 * @QQ: 1299234582
 * @Author: zzh
 * @Description: PluginInitializer.java
 */
public final class PluginInitializer {
    private static PluginInitializer instance;

    private PluginInitializer() {
    }

    public static void init() {
        if (instance == null) {
            synchronized (PluginInitializer.class) {
                if (instance == null) {
                    PluginReflectUtil.init();
                    instance = new PluginInitializer();
                    PluginMsgLooper looper = new PluginMsgLooper().start();
                    Installer.initHost(looper);
                }
            }
        }
    }
}
